package com.wing.product.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.product.model.entity.ProOutsourcingOrder;
import com.wing.product.model.request.ProOutsourcingOrderAddOrUpdateForm;
import com.wing.product.model.response.ProOutsourcingOrderSearchVO;

import java.util.Map;

/**
 * 委外订单
 * @author hz
 */
public interface ProOutsourcingOrderService extends IService<ProOutsourcingOrder> {

    /**
     * 查询委外订单信息
     * @param pg
     * @param paramMap
     * @return
     */
    IPage<ProOutsourcingOrder> pageList4app(Page<ProOutsourcingOrder> pg, Map<String, Object> paramMap);

    /**
     * 添加委外订单
     * @param proOutsourcingOrderAddOrUpdateForm 订单入参
     * @return 是否添加成功
     */
    Boolean add(ProOutsourcingOrderAddOrUpdateForm proOutsourcingOrderAddOrUpdateForm);

    /**
     * 查询委外详情
     * @param orderId
     * @return
     */
    ProOutsourcingOrderSearchVO getDetailBy(Long orderId);

    /**
     * 修改委外订单
     * @param proOutsourcingOrderAddOrUpdateForm
     * @return
     */
    Boolean updateBy(ProOutsourcingOrderAddOrUpdateForm proOutsourcingOrderAddOrUpdateForm);

    /**
     * 提交或者审核订单
     * @param orderId
     * @param status
     * @return
     */
    Boolean audit(Long orderId, String status);

    /**
     * 提交委外订单
     * @param orderId
     * @return
     */
    Boolean submit(Long orderId);
}
